﻿@model Web.Models.RegisterModel

@{
    ViewBag.Title = "Register";
}


<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Register", "Account", FormMethod.Post, new {@class="form-inline"}))
{
    <div style="width: 600px; margin-top:40px; margin-left: auto; margin-right: auto;">
        <h2>Create a New Account</h2>
        
        <fieldset>
            <legend>Account Information</legend>

            <div>
                @Html.LabelFor(m => m.UserName)
            </div>
            <div class="control-group">
                @Html.TextBoxFor(m => m.UserName)
                @Html.ValidationMessageFor(m => m.UserName)
            </div>

            <div>
                @Html.LabelFor(m => m.Email)
            </div>
            <div class="control-group">
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(m => m.Email)
            </div>
            
            <div>
                @Html.LabelFor(m => m.Password)                
            </div>
            <div class="control-group">
                <div class="controls">
                    @Html.PasswordFor(m => m.Password)
                    @Html.ValidationMessageFor(m => m.Password)
                </div>
            </div>
            <div>
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="control-group">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>

            <div>
                <button type="submit" class="btn btn-primary">Register</button>
                <button class="btn" type="reset">Cancel</button>
            </div>
            @{ Html.RenderPartial("ValidationSummary", ViewData.ModelState); }
@*            <div>
                @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
            </div>*@
        </fieldset>
    </div>
}
